package com.test;
import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Reducer;
public class EmployeeReducer extends Reducer<IntWritable, Employee, IntWritable, IntWritable>{

    protected void reduce(IntWritable k3, Iterable<Employee> v3,Context context)throws IOException, InterruptedException{
        int total = 0;
        for(Employee e:v3){
            total = e.getSal();
        }
        //输出
        context.write(k3,new IntWritable(total));
    }
}
